<include file="Public/header" />
<title>欢迎页</title>
<script src="__PUBLIC__/highcharts/highcharts.js"></script>
</head>
<body>
<div style="padding:20px 0 20px 20px;float:left;width:98%;">
<p class="f-16 text-success">欢迎登陆天众供应链仓储管理系统(企业端)！</p>  
  
</div>

<div class="pd-20">

	<div class="cl pd-5 mt-20"> 
		<form class="formleft"  action="__URL__/welcome/" method="post">
			日期范围:
			<input type="input-text" name="start_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="start_time" class="input-text Wdate" style="width:160px;" value="<{:date('Y-m-d',time())}>"  placeholder="开始时间"> -
			<input type="input-text" name="end_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="end_time" class="input-text Wdate" style="width:160px;"  value="<{:date('Y-m-d',time()+86400)}>"    placeholder="结束时间">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>
		</form>
    </div>
</div>

<div style="width:98%;float:left;">

<div id="container" style="width: 98%; height: 400px; margin: 0 auto;float:left;"></div>
<div style="float:left;width:98%;margin:10px 0;margin-left:15px;">
	<table class="table table-border table-bordered table-bg" style="width:100%;float:left;">
		<thead>
			<tr>
				<th scope="col" colspan="3">时间列表
				</th>
			</tr>
			<tr class="text-c">
				<th style="width:50px;">序号</th>
				<th style="width:250px;">时间</th>
				<th style="width:250px;">采购单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_t" id="vo">
			<tr class="text-c">
				<td><{$i}></td>
				<td><{$vo.t_time}></td>
				<td><{$vo.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td><{$count_all}></td>
			</tr>	
		</tbody>
	</table>

</div>
</div>

<script language="JavaScript">
$(document).ready(function() {
   var chart = {
      type: 'area'
   };
   var title = {
      text: ''   
   };

   var xAxis = {
      categories: [<{$categories}>],
      tickmarkPlacement: 'on',
      title: {
         enabled: false
      }
   };
   var yAxis = {
      title: {
         text: '数量'
      },
      labels: {
         formatter: function () {
            return this.value / 1000 + 'k';
         }
      }
   };

   var plotOptions = {
      area: {
         marker: {
            enabled: false,
            symbol: 'circle',
            radius: 2,
            states: {
               hover: {
                 enabled: true
               }
            }
         }
      }
   };
   var series= [{
         name: '采购单',
         data: [<{$datas}>],
		 }
   ];     
      
   var json = {};   
   json.chart = chart; 
   json.title = title;   


   json.xAxis = xAxis;
   json.yAxis = yAxis;  
   json.series = series;
   json.plotOptions = plotOptions;
   $('#container').highcharts(json);
  
});
</script>

<script type="text/javascript">
    $(function(){
		$(".page_count").change(function(){
			var order_no=$('input[name=order_no]').val();
			var start_time=$('input[name=start_time]').val();
			var end_time=$('input[name=end_time]').val();
			var url="__MODULE__/Finance/list_list";
			<!-- alert(end_time); -->
			if(order_no!=""){
				url=url+"/order_no/"+order_no;
			}
			if(start_time!="" && start_time!=undefined){
				url=url+"/start_time/"+start_time;
			}
			if(end_time!="" && end_time!=undefined){
				url=url+"/end_time/"+end_time;
			}
			location.href=url+"/listrows/"+$(this).val();
		});
    })
</script>
<include file="Public/footer" />
<include file="Public/footer_js" />
</body>
</html>